package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum RangerMaskOpen {

    MASK_CLOSE(0, "CLOSE"),
    MASK_OPEN(1, "OPEN");
    private int id;
    private String name;

    RangerMaskOpen(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public static RangerMaskOpen ObjOf(Integer status) {
        if (status == null) {
            return null;
        } else {
            for (RangerMaskOpen s : RangerMaskOpen.values()) {
                if (s.getId() == status) {
                    return s;
                }
            }
            return null;
        }
    }
}
